gdk_drag_find_window_for_screen
gdk_drag_begin
gdk_drag_begin_for_device
+gdk_drag_begin_from_point
gdk_drag_motion
gdk_drop_finish
GdkDragProtocol
GdkDragContext *
_gdk_broadway_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets)
+ GList *targets,
+ gint x_root,
+ gint y_root)
{
GdkDragContext *new_context;
void _gdk_broadway_window_register_dnd (GdkWindow *window);
GdkDragContext * _gdk_broadway_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets);
+ GList *targets,
+ gint x_root,
+ gint y_root);
void _gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
#include <gdk/gdktypes.h>
#include <gdk/gdkdevice.h>
+#include <gdk/gdkevents.h>
G_BEGIN_DECLS
GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets);
+GDK_AVAILABLE_IN_3_20
+GdkDragContext * gdk_drag_begin_from_point (GdkWindow *window,
+ GdkDevice *device,
+ GList *targets,
+ gint x_root,
+ gint y_root);
GDK_AVAILABLE_IN_ALL
void gdk_drag_find_window_for_screen (GdkDragContext *context,
* Returns: (transfer full): a newly created #GdkDragContext
*/
GdkDragContext *
-gdk_drag_begin_for_device (GdkWindow *window,
- GdkDevice *device,
- GList *targets)
+gdk_drag_begin_for_device (GdkWindow *window,
+ GdkDevice *device,
+ GList *targets)
{
- return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, targets);
+ gint x, y;
+
+ gdk_device_get_position (device, NULL, &x, &y);
+
+ return gdk_drag_begin_from_point (window, device, targets, x, y);
+}
+
+/**
+ * gdk_drag_begin_from_point:
+ * @window: the source window for this drag
+ * @device: the device that controls this drag
+ * @targets: (transfer none) (element-type GdkAtom): the offered targets,
+ * as list of #GdkAtoms
+ * @x_root: the x coordinate where the drag nominally started
+ * @y_root: the y coordinate where the drag nominally started
+ *
+ * Starts a drag and creates a new drag context for it.
+ *
+ * This function is called by the drag source.
+ *
+ * Returns: (transfer full): a newly created #GdkDragContext
+ *
+ * Since: 3.20
+ */
+GdkDragContext *
+gdk_drag_begin_from_point (GdkWindow *window,
+ GdkDevice *device,
+ GList *targets,
+ gint x_root,
+ gint y_root)
+{
+ return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, targets, x_root, y_root);
}
/**
void (* register_dnd) (GdkWindow *window);
GdkDragContext * (*drag_begin) (GdkWindow *window,
GdkDevice *device,
- GList *targets);
+ GList *targets,
+ gint x_root,
+ gint y_root);
void (*process_updates_recurse) (GdkWindow *window,
cairo_region_t *region);
GdkDragContext *
_gdk_quartz_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets)
+ GList *targets,
+ gint x_root,
+ gint y_root)
{
g_assert (_gdk_quartz_drag_source_context == NULL);
void _gdk_quartz_window_register_dnd (GdkWindow *window);
GdkDragContext * _gdk_quartz_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets);
+ GList *targets,
+ gint x_root,
+ gint y_root);
/* Display */
GdkDragContext *
_gdk_wayland_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets)
+ GList *targets,
+ gint x_root,
+ gint y_root)
{
GdkWaylandDragContext *context_wayland;
GdkWaylandDisplay *display_wayland;
void _gdk_wayland_window_register_dnd (GdkWindow *window);
GdkDragContext *_gdk_wayland_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets);
+ GList *targets,
+ gint x_root,
+ gint y_root);
void _gdk_wayland_window_offset_next_wl_buffer (GdkWindow *window,
int x,
int y);
-
GdkDragContext * _gdk_wayland_drop_context_new (struct wl_data_device *data_device);
void _gdk_wayland_drag_context_set_source_window (GdkDragContext *context,
GdkWindow *window);
GdkDragContext *
_gdk_win32_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets)
+ GList *targets,
+ gint x_root,
+ gint y_root)
{
if (!use_ole2_dnd)
{
/* stray GdkWindowImplWin32 members */
void _gdk_win32_window_register_dnd (GdkWindow *window);
-GdkDragContext *_gdk_win32_window_drag_begin (GdkWindow *window, GdkDevice *device, GList *targets);
+GdkDragContext *_gdk_win32_window_drag_begin (GdkWindow *window, GdkDevice *device, GList *targets, gint x_root, gint y_root);
gboolean _gdk_win32_window_simulate_key (GdkWindow *window,
gint x,
gint y,
GdkDragContext *
_gdk_x11_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets)
+ GList *targets,
+ gint x_root,
+ gint y_root)
{
GdkDragContext *context;
GdkDragContext * _gdk_x11_window_drag_begin (GdkWindow *window,
GdkDevice *device,
- GList *targets);
+ GList *targets,
+ gint x_root,
+ gint y_root);
gboolean _gdk_x11_get_xft_setting (GdkScreen *screen,
const gchar *name,